<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    {include file="../tpl/header.html" /}
</head>
<body>
{include file="../tpl/menu.html" /}
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">
                    {if condition="check_auth('admin/admin/sysconfadd')"}
                    <button class="layui-btn" onclick="xadmin.open('添加','{:url('admin/admin/sysConfAdd')}')"><i class="layui-icon"></i>添加</button>
                    {/if}
                    {if condition="check_auth('admin/admin/sysconfcache')"}
                    <button class="layui-btn layui-btn-danger" onclick="request_result('{:url('admin/admin/sysConfCache')}','确定要更新缓存吗?')"><i class="layui-icon"></i>更新缓存</button>
                    {/if}
                    {if condition="check_auth('admin/admin/clearstatic')"}
                    <button class="layui-btn layui-btn-danger" onclick="request_result('{:url('admin/admin/clearStatic')}','确定要更新缓存吗?')"><i class="layui-icon"></i>更新全站CSS/JS缓存</button>
                    {/if}
                </div>
                <div class="layui-card-body layui-table-body layui-table-main">
                    <table class="layui-table layui-form">
                        <thead>
                        <tr>
                            <th>ID</th>
                            <th>名称</th>
                            <th>类型</th>
                            <th>key</th>
                            <th>val</th>
                            <th>简介</th>
                            <th>添加时间</th>
                            <th>最后修改时间</th>
                            <th>操作</th></tr>
                        </thead>
                        <tbody>
                        {volist name="list" id="vo"}
                        <tr>
                            <td>{$vo['id']}</td>
                            <td>{$vo['name']}</td>
                            <td>{$type_list[$vo['type']]}</td>
                            <td>{$vo['key']}</td>
                            <td>{$vo['value']}</td>
                            <td>{$vo['desc']}</td>
                            <td>{$vo['add_time']}</td>
                            <td>{$vo['update_time']}</td>
                            <td class="td-manage">
                                {if condition="check_auth('admin/admin/sysConfEdit')"}
                                <button title="编辑" class="layui-btn layui-bg-blue layui-btn-xs"  onclick="xadmin.open('编辑','{:url('admin/admin/sysConfEdit',['id' => $vo['id']])}')" >
                                    <i class="layui-icon">&#xe642;</i>编辑
                                </button>
                                {/if}
                                {if condition="check_auth('admin/admin/sysConfCache')"}
                                <button class="layui-btn layui-btn-danger" onclick="request_result('{:url('admin/admin/sysConfCache',['id' => $vo['id']])}','确定要更新缓存吗?')">更新缓存</button>
                                {/if}
                            </td>
                        </tr>
                        {/volist}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>